package com.zhoug.common3.utils.qrcode;

/**
 *发票
 * @Author 35574
 * @Date 2022/1/5
 * @Description
 */
public class Fapiao {
    public static final String TYPE1="10";//增值税电子普通发票
    public static final String TYPE2="04";//增值税普通发票
    public static final String TYPE3="01";//增值税专用发票,没有校验码

    private String type;//种类代码
    private String typeName;//种类代码
    private String code;//发票代码
    private String number;//发票号码
    private Double money;//合计金额(不含税)
    /**
     * 开票日期 格式:yyyyMMdd
     */
    private String date;//开票日期
    private String checkCode;//校验码

    public Fapiao() {
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getCheckCode() {
        return checkCode;
    }

    public void setCheckCode(String checkCode) {
        this.checkCode = checkCode;
    }

    public String getTypeName() {
        if(typeName==null && type!=null){
            if(type.equals(TYPE1)){
                typeName="增值税电子普通发票";
            }else if(type.equals(TYPE2)){
                typeName="增值税普通发票";
            }else if(type.equals(TYPE3)){
                typeName="增值税专用发票";
            }else{
                typeName="";
            }
        }
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }
}
